class Mpu:

    def __init__(self, framework):
        self.framework = framework
        self.command = {}
        self.temperature = 0.00
        self.pressure = 0.00
        self.rol = 0.00
        self.pit = 0.00
        self.yaw = 0.00

    def mpu_get_attitude(self, data):
        return_data = 0.00
        if data == "rol":
            return_data = self.rol
        if data == "pit":
            return_data = self.pit
        if data == "yaw":
            return_data = self.yaw
        return return_data

    def mpu_attitude(self):
        self.command = {"type": "mpu-attitude"}
        if self.framework.status:
            self.framework.write(self.command)

    def mpu_temperature(self):
        self.command = {"type": "mpu-temperature"}
        if self.framework.status:
            self.framework.write(self.command)

    def mpu_pressure(self):
        self.command = {"type": "mpu-pressure"}
        if self.framework.status:
            self.framework.write(self.command)
